﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using SES.CMS.DO;
using SES.CMS.BL;
namespace SES.CMS
{
    public partial class Album : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            int id = 0;
            if (Request.QueryString["ID"] != null)
            {
                id = int.Parse(Request.QueryString["ID"].ToString());
                DataTable dt = new cmsImagesBL().SelectByAlbumID(id, 1);
                if (dt.Rows.Count == 0)
                {
                    if (Session["lang"].ToString() == "VN")
                        lbl.Text = "Hiện tại chưa có Video!!";
                    else
                        lbl.Text = "Empty!!";
                }
                else
                {
                    if (dt.Rows.Count > 0)
                    {
                        rpt.DataSource = dt;
                        rpt.DataBind();
                    }
                }

                if (Session["lang"].ToString() == "VN")
                {
                    Page.Title = new cmsAlbumBL().Select(new cmsAlbumDO { AlbumID = id }).Title;
                    lbDescription.Text = new cmsAlbumBL().Select(new cmsAlbumDO { AlbumID = id }).Description;
                }
                else
                {
                    Page.Title = new cmsAlbumBL().Select(new cmsAlbumDO { AlbumID = id }).eTitle;
                    lbDescription.Text = new cmsAlbumBL().Select(new cmsAlbumDO { AlbumID = id }).eDescription;
                }
            }
        }
        public string Change_AV(string ip_str_change)
        {
            return Ultility.Change_AV(ip_str_change);
        }
    }
}
